package sm.dbdict.def;

public class FileOptions implements Cloneable {
	private Boolean shadow;

	private Boolean reselect;

	public Boolean getShadow() {
		return shadow;
	}

	public void setShadow(Boolean shadow) {
		this.shadow = shadow;
	}

	public Boolean getReselect() {
		return reselect;
	}

	public void setReselect(Boolean reselect) {
		this.reselect = reselect;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((reselect == null) ? 0 : reselect.hashCode());
		result = prime * result + ((shadow == null) ? 0 : shadow.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FileOptions other = (FileOptions) obj;
		if (reselect == null) {
			if (other.reselect != null)
				return false;
		} else if (!reselect.equals(other.reselect))
			return false;
		if (shadow == null) {
			if (other.shadow != null)
				return false;
		} else if (!shadow.equals(other.shadow))
			return false;
		return true;
	}

	@Override
	public Object clone() {
		try {
			FileOptions clonedObj = (FileOptions) super.clone();
			clonedObj.reselect = reselect;
			clonedObj.shadow = shadow;
			return clonedObj;
		} catch (CloneNotSupportedException e) {
			// this shouldn't happen, since we are Cloneable
			throw new InternalError();
		}
	}
}
